<?php

namespace app\common\util;

use app\common\model\Admin;

/**
 * 管理员登录信息
 */
class AdminLoginInfo
{
    private static $admin = null;
    private static $admin_id = null;

    public static function setAdmin(Admin $admin){
        if (!empty($admin)) {
            self::$admin = $admin;
            self::$admin_id = $admin->id;
        }
        return $admin;
    }

    public static function getAdmin(){
        return self::$admin;
    }

    public static function getAdminId(){
        return self::$admin_id;
    }
}
